<div id="post_trash_container">
    <div id="post_sidebar">
        <?php 
            if($this->session->userdata('role') === 'admin') { 
                echo anchor('post/pending/view', 'Pending('.$num_pending.')', 'id="pending_post"');
            };
            if ($this->session->userdata('role') === 'author') {
                echo anchor('post/rejected', 'Rejected('.$num_reject.')', 'id="pending_post"');
            };
            echo anchor('post/draft/'.$this->session->userdata('user_id'), 'Draft('.$num_draft.')', 'id="view_draft"');
            echo anchor('post/trash', 'Trash('.$num_trash.')', 'id="view_trash"');
            echo anchor('post/create', 'Create Post', 'id="create_post"');
         ?>
    </div>
    <div id="post_trash_wrapper">
        <p id="message"><?php echo $error.$success; ?></p>
        <table id="trash_table">
            <th id="trash_title">Title</th>
            <th id="trash_date_time_deleted">Date Time Deleted</th>
            <th id="trash_recover"></th>
            <th id="trash_delete"></th>
            <?php foreach ($trash as $trash_item): ?>
            <tr>
                <td class="td_left"><?php echo $trash_item['title'].'</a>'; ?></td>
                <td class="td_left"><?php echo $trash_item['date_time_deleted']; ?></td>
                <td class="td_center"><?php echo anchor('post/trash/recover/'.$trash_item['post_id'], 'Recover', array('onClick' => "return confirm('Are you sure you want to recover this post?')"));?></td>
                <td class="td_center"><?php echo anchor('post/trash/delete/'.$trash_item['post_id'], 'Delete', array('onClick' => "return confirm('Are you sure you want to permanently delete this post?')"));?></td>
            </tr>
            <?php endforeach; ?>
        </table>
    </div>
</div>